import lsRequest from "../index";
import {
  ILoginInfo,
  ILoginResult,
  IRegister,
  IUpdateUserInfo,
  IUpdateUserInfoResult,
} from "./types";
import { IDataType } from "../types";
enum loginRegisterType {
  Login = "/user/login",
  Register = "/user/register",
  updateUserInfo = "/user/updateUserInfo",
}

//登录
export async function loginUser(loginInfo: ILoginInfo) {
  return lsRequest.post<IDataType<ILoginResult>>({
    url: loginRegisterType.Login,
    data: loginInfo,
  });
  const res = await lsRequest.post<IDataType<ILoginResult>>({
    url: loginRegisterType.Login,
    data: loginInfo,
  });
}
